<?php
/* @var $this MenuitemController */
/* @var $model Menuitem */

$this->breadcrumbs=array(
	'父菜单'=>array('admin'),
	$model->title,
);

$this->menu=array(
	array('label'=>'创建父菜单', 'url'=>array('create')),
	array('label'=>'更新当前父菜单', 'url'=>array('update', 'id'=>$model->menuitem_id)),
	array('label'=>'删除当前父菜单', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->menuitem_id),'confirm'=>'Are you sure you want to delete this item?')),
    array('label'=>'管理父菜单', 'url'=>array('admin')),
	array('label'=>'在当前父菜单下创建子菜单', 'url'=>array('submenu/create/'.$model->menuitem_id)),
);
?>

<h1>当前父菜单 #<?php echo $model->title; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'menuitem_id',
		'title',
	),
)); ?>

<h1>子菜单</h1>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'submenu-grid',
	'dataProvider'=>$submenuDataProvider,
//	'filter'=>$model->tblSubmenus,
    'columns'=>array(
        'title',
        array(
            'class'=>'CButtonColumn',
            'template'=>'{view}{update}{delete}',
            'buttons'=> array(
                'view' => array(
                    'url'=>'Yii::app()->createURL("admin/submenu/view", array("id"=>"$data->submenu_id"))',
                ),
                'update' => array(
                    'url'=>'Yii::app()->createURL("admin/submenu/update", array("id"=>"$data->submenu_id"))',
                ),
                'delete' => array(
                    'url'=>'Yii::app()->createURL("admin/submenu/delete", array("id"=>"$data->submenu_id"))',
                ),

            ),
            'header'=>'Actions',
        ),
    ),
)); ?>


